// run: $exec < input
#include <iostream>
#include <cstring>

struct data
{
	int x, y;
};

int const maxn = 100007;
bool vis[2 * maxn];
data da[maxn];
int n, m;

template <class T>
T abs(T x) { return x < 0 ? -x : x; }

int main()
{
	std::ios_base::sync_with_stdio(false);
	int T; std::cin >> T;
	while (T--) {
		std::cin >> n >> m;
		/*
		if (2 * m + 10 < n * (n - 1) / 2) {
			std::cout << "YES\n";
			continue;
		}
		*/
		memset(vis, 0, sizeof(vis));
		for (int i = 0; i < n; i++)
			std::cin >> da[i].x >> da[i].y;
		bool ok = false;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				int tmp = abs(da[i].x - da[j].x) + abs(da[i].y - da[j].y);
				if (vis[tmp]) { ok = true; break; }
				vis[tmp] = true;
			}
			if (ok) break;
		}
		if (ok) std::cout << "YES\n";
		else std::cout << "NO\n";
	}
}

